//
//  BaseModel.m
//  Life_Hall
//
//  Created by GuoJingfen on 2016/11/3.
//  Copyright © 2016年 neusoft. All rights reserved.
//

#import "GJFBaseModel.h"

@implementation GJFBaseModel

- (instancetype)initWithDic:(NSDictionary *)dic {
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}
+ (instancetype)modelWithDic:(NSDictionary *)dic {
    id m = [[[self class] alloc] initWithDic:dic];
    return m;
}
+ (NSMutableArray *)transformWithArr:(NSArray *)array{
    NSMutableArray *arrayModel = [NSMutableArray array];
    for (NSDictionary *dic in array) {
        @autoreleasepool {
            id m = [self modelWithDic:dic];
            [arrayModel addObject:m];
        }
    }
    return arrayModel;
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

- (void)setNilValueForKey:(NSString *)key {
    
}

@end
